When a data packet stream with regular packet intervals (TrepInterval)—like for instance in a conversational telephony service—enters to a network node—like for instance some media gateway—from such an interface, where transport delay varies, a jitter buffer is required in the node in order to guarantee a continuous and constant rate play-out with regular intervals from the network node towards another interface, which may require very small variation in the output timing (like circuit switched telephony networks, or a constant rate play-out on a user equipment).
The motivation and principles of jitter buffering in a network node are illustrated in FIG. 4, depicting the principles of jitter. Only the essential parts are shown in the figure, and all other necessary processing functions—like for instance speech decoder in a conversational telephony service—are omitted. The figure is only a one-way view omitting the other direction, even if the connection may be full-duplex like for instance in a conversational telephony service.
A source node 10 generates a packet stream with a constant interval represented by TrepInterval. This packet stream is transported through a network like a packet switched network 30. The packet switched network 30 may cause delays which are not constant resulting in jitter. The packet stream transported over network 30 is received at the network node 20, which needs now to remove the jitter. An example of the network node 20 may be a media gateway. The network node 20 comprises a jitter buffer 22 for storing the packets of the packet stream received from the network 30. The network node also plays out the packets from the jitter buffer 22 with a constant interval. Playing out means that the packets are output or forwarded to another network like a transport network 40. The transport network 40 may be a network that does not tolerate jitter like for instance a circuit switched network.
Reference number 24 schematically indicates the part of the network node 20 which play out packets from the jitter buffer with a known or constant interval and outputs them to the network 40.
The idea of jitter buffer is to compensate for the variation of the transport delay over the first (e.g. packet switched) network and keep the total delay (dtotal) between the play-out time from the jitter buffering node and the transmission time from the packet source as constant as possible.
This is illustrated by an example in FIG. 5. The individual transport delays (di) are random variables with a certain distribution in the range between the smallest (dmin) and largest (dmax) delay. The probability density function (pdf) is usually not a symmetric Gaussian pdf, but an asymmetric distribution (for instance like Poisson's distribution by the shape) is quite typical. The peak-to-peak jitter (Jpeaktopeak) is ˜6.5 ms in the example of FIG. 2 and stands for the difference dmax−dmin. It is not normally known in advance, but must be based on measurements and/or reasonable estimates related e.g. to the interface (or use case). Exact values for dmin and dmax are neither known definitely, but they are specified indirectly by certain probabilities—like for instance P{di<dmin}<{acute over (ε)}1 and P{di<dmax}<1−{acute over (ε)}2, where {acute over (ε)}1 and {acute over (ε)}2 are some small values e.g. in the range 10−5, . . . , 10−3.
The jitter protection time (Tjit) is typically added to the arrival time (Tin,0) of the first packet to get the play-out time (Tout,0) for the first packet. After that the play-out time for the subsequent packet i is given by a recursion Tout,i=Tout,i−1+TrepInterval. This is illustrated in FIG. 5 by the horizontal line corresponding to the play-out delay. The individual buffering delay of a packet i is defined by dbuf,i=Tout,i−Tin,i=dtotal−di, which is a complementary random variable with respect to the (unknown) transport delay di (i.e. the bigger di is, the smaller dbuf,i is and vice versa).
The value of Tjit is set so that it protects against late losses, which mean that the jitter buffer is empty, when the next play-out time Tout,i expires. However in order to keep the jitter buffering margin and consequently the total delay as small as possible Tjit must be set as small as possible. This is a trade-off between late loss probability and delay. In the static jitter buffering example of FIG. 5 Tjit has been set to 7 ms so that there is a margin of ˜0.5 ms on top of the so far experienced peak-to-peak jitter (Jpeaktopeak) of 6.5 ms.
The determination of the play-out time sequence Tout,i is also called by the word synchronization. Note that because the first arrival time Tin,0 is also a random variable corresponding to one sample of the random transport delay d0, it is actually a constant Tin,k,0 per a stream instance k, but it is randomly distributed over the set of instances k in a similar way as the individual transport delays di are distributed over the set of delays. It is noted that in this discussion it is assumed that the distribution of the delays is time invariant. So actually the total delay dtotal,k is a random variable over instances k in the range dmin+Tjit, . . . , dmax+Tjit with the same distribution as di, but time invariant i.e. jitter free per instance k. In the example of the FIG. 5 Tin,0 corresponds to a transport delay d0=21 ms, which is close to observed dmin in this example.
One problem that may occur in the prior art consists in that the packet source 10 of FIG. 4 may change the phase of the delivery sequence by a certain time step after the jitter buffering in the receiving node has been synchronized. In other words, the synchronization source may change. When this happens, the optimal play-out time sequence with respect to the new arrival time sequence is usually not aligned with the original play-out time sequence. This typically causes a misalignment delay that may in the worst case result in a sudden increase of late losses, since some or many packets are received with an excessive delay. This is illustrated for instance in FIG. 6. It should be noted that late losses may be caused also by other factors different from resynchronization or from a time step change at the packet source 10. For instance, late losses may be caused by real jitter caused by noise or delays in the network that result in an accidental and sometimes sporadic late loss. Such a situation is depicted for instance in FIG. 14, showing a case where a delay peak due to high jitter caused an overshoot of the delay with which the packet is received at the network node. Such late received packet may also result in late loss. Prior art techniques are based on the detection of overshoots in order to monitor the occurrence of late losses. However, a problem arises in the prior art consisting in how to reliably detect the presence of resynchronization, i.e. how to reliably detect that a certain time step change has occurred at a node in a network resulting in a different phase with which packets are received at the network node 20 and from there forwarded. Moreover, a problem exist in that the prior art technique based on the detection of overshoots is not capable of distinguishing between overshoots caused by delay peaks caused by high jitter, for instance due to noise or accidental delays in the network, and overshoots caused instead by a resynchronization. Thus, the prior art suffers from the problem of not being able to reliably detect the presence of resynchronization when this occurs in the network.
Moreover, the prior art also suffers from the fact that the play-out time selected for forwarding the packets from the network node 20 to the network 40 leads to excessive and non optimal delays. In fact, when late losses occur and when those are correctly detected, regardless of whether they are caused by sporadic delay peaks due to high jitter or by resynchronization, prior art techniques are based on increasing the play-out time in order to ensure that no more late losses occur. According to the prior art, the increase of the play-out time is made in a static way by increasing the play out time up to a maximum allowed delay. Such a measure is typically implemented with the aim of reducing further late losses. However, such solutions lead to an excessive delay which is often unnecessary in view of the total distribution of delays. Thus, the prior art suffers also from the problem that the play out time leads to excessive delays when protection against late losses is desired. In other words, the prior art suffers also from the problem that the play out time is not optimized according to the network conditions that may cause resynchronizations or sporadic and accidental high jitters.